package cn.edu.scau.cmi.luotiansheng_chapter4;

public class Example4_4 {
	public static void main(String[] args) {
		double sum=0,item=1;
		int i=1,n=20;
		while(i<20) {
			sum+=item;
			i++;
			item=item*(1.0/i);
		}
		System.out.println(sum);
	}
}
